package com.zhongge.custombintree;

/**
 * @ClassName TestMyBinTree
 * @Description TODO 测试自定义的二叉树
 * @Author zhongge
 * @Date 2025/9/3 10:35
 * @Version 1.0
 */
public class TestMyBinTree {
    public static void main(String[] args) {
        MyBinTree tree = new MyBinTree();
        char[] in = {'9','3','1','2','7'};
        char[] post ={'9','1','7','2','3'};
        MyBinTree.TreeNode root = tree.createBinTreeByInOrderAndPostOrder(in, post);
    }
    public static void main2(String[] args) {
        MyBinTree tree = new MyBinTree();
        char[] pre = {'3','9','2','1','7'};
        char[] in ={'9','3','1','2','7'};
        MyBinTree.TreeNode root = tree.createBinTreeByPreOrderAndInOrder(pre, in);
    }
    public static void main1(String[] args) {
        MyBinTree tree = new MyBinTree();
        MyBinTree.TreeNode root1 = tree.createBinTreeByHand();
        MyBinTree.TreeNode root2 = tree.createBinTreeByPreOrderAndLeaf("abc##de#g##f###");
    }
}
